import {ChangeDetectorRef, Component, forwardRef, Inject, OnInit} from '@angular/core';
import {BaseSelectConfig} from '@sb/base';
import {HyProjectSearchForm} from '../entity/hy-project-search-form';
import {BaseSelect2Component} from '@sb/base/select/base-select2.component';
import {NG_VALUE_ACCESSOR} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {HyProjectService} from '../service/hy-project.service';


export interface HyProjectSelectConfig extends BaseSelectConfig<HyProjectSearchForm> {
    notShow?: string | string[];
}

@Component({
    selector: 'hy-project-select',
    templateUrl: './hy-project-select.component.html',
    styleUrls: ['./hy-project-select.component.less'],
    providers: [
        {
            provide: NG_VALUE_ACCESSOR,
            useExisting: forwardRef(() => HyProjectSelectComponent),
            multi: true
        }
    ]
})
export class HyProjectSelectComponent extends BaseSelect2Component<HyProjectSearchForm>  implements OnInit {

    constructor(
        protected message: NzMessageService,
        protected hyProjectService: HyProjectService,
        @Inject(ChangeDetectorRef) public readonly cd: ChangeDetectorRef) {
        super(message, hyProjectService, cd);
    }

    ngOnInit() {
        super.ngOnInit();
    }

    doInit() {
    }

}
